<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户注册</title>
</head>
    <link href="css/bootstrap.css" rel="stylesheet">
    <script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
    <script type="text/javascript" src="js/bootstrap.js"></script>
    <script type="text/javascript" >


        function submitForm(){
            $.ajax({
                url:"http://117.51.148.226:8888/admin/admin/regist",
                data:$("#inputForm").serialize(),
                type:"POST",
                dataType:"JSON",
                success:function(result){
                    console.log(result)
                    if (result.status == 0){
                        alert(result.msg)
                    }else{
                        location.href="main.html"
                    }
                }
            })
        }
    </script>
<body>
<div class="container">
    <div class="row">
        <div class="col-sm-2"></div>
        <div class="col-sm-8">
            <div class="page-header">
                <h1>用户注册 <small>please regist</small></h1>
            </div>
            <form class="form-horizontal" id="inputForm" enctype="multipart/form-data">
                <div class="form-group">
                    <label for="inputUsername3" class="col-sm-2 control-label"><font color="red">*</font>用户名：</label>
                    <div class="col-sm-10">
                        <input type="text" name="username" class="form-control" id="inputUsername3" placeholder="username">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"><font color="red">*</font>密码：</label>
                    <div class="col-sm-10">
                        <input type="password" name="password" class="form-control" id="inputPassword3" placeholder="password">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputNickname3" class="col-sm-2 control-label"><font color="red">*</font>昵称：</label>
                    <div class="col-sm-10">
                        <input type="text" name="nickname" class="form-control" id="inputNickname3" placeholder="nickname">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPhone3" class="col-sm-2 control-label">联系电话：</label>
                    <div class="col-sm-10">
                        <input type="text" name="phone" class="form-control" id="inputPhone3" placeholder="phone">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label">邮箱：</label>
                    <div class="col-sm-10">
                        <input type="text" name="email" class="form-control" id="inputEmail3" placeholder="email">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputCode3" class="col-sm-2 control-label"><font color="red">*</font>激活码：</label>
                    <div class="col-sm-10">
                        <input type="text" name="code" class="form-control" id="inputCode3" placeholder="请联系管理员获取激活码">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="button" class="btn btn-default" onclick="submitForm()">注册</button>
                    </div>
                </div>
            </form>
        </div>
        <div class="col-sm-2"></div>
    </div>
</div>

</body>
</html>